<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="src/es6/Driver.js"></script>
    <script type="text/javascript">
        const driver = new Driver('pallet', 1);
        driver.on("process", function (state) {
            console.log(state)
        })
        driver.open().then(function () {
            var arrPlayers = []
            for(let i=0; i<100; i++) {
                arrPlayers.push({
                    name: `韩梅梅${i}`,
                    sex: `女${i}`,
                    age: i%3
                })
            }
            driver.createTable({
                name: 'player',
                primaryKey: 'id',
                autoIncrement: true,
                indexes: [
                  {name: 'age_index', column: 'age'},
                ],
                data : arrPlayers
            })
        })
    </script>
</head>
<body>
</body>
</html>